<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBoxPointproductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('box_pointproducts', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->nullable()->comment('用户id');
            $table->integer('class_id')->nullable()->comment('积分商品分类id');
            $table->string('title')->nullable()->comment('积分商品标题');
            $table->string('content')->nullable()->comment('商品介绍');
            $table->string('image')->default('')->comment('商品图片');
            $table->integer('integral')->nullable()->comment('购物积分');
            $table->decimal('weight')->nullable()->comment('重量');
            $table->string('attribute')->nullable()->comment('规格');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('box_pointproducts');
    }
}
